#include<bits/stdc++.h>
#define db double
using namespace std;
inline int read()
{
	int res=0,f=1;char c=getchar();
	while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
	while(c>='0'&&c<='9'){res=(res<<1)+(res<<3)+(c^48);c=getchar();}
	return res*f;
}
void write(int x)
{
	if(x<0)putchar('-'),x=-x;
	if(x>9)write(x/10);
	putchar(x%10+'0');
}
int n,m;
int p[114514];
db f[505][505];
struct node
{
	int a,b;
	bool operator<(const node &x)const{return b<x.b;}
}x[114514];
db dp()
{
	for(int i=0;i<=n;i++)
	for(int j=0;j<=m;j++) f[i][j]=1e9; 
	f[0][0]=0;
	for(int i=1;i<=n;i++)
		for(int j=i;~j;j--)
			for(int k=i;k;k--)
			{
				f[j][k]=min(f[j][k],f[j][k-1]+1.0*x[p[i]].a/(j+1));
				if(j&&x[p[i]].b!=1e9) f[j][k]=min(f[j][k],f[j-1][k-1]+1.0*x[p[i]].b/j);
			}
	db res=1e9;
	for(int i=0;i<=n;i++) res=min(res,f[i][m]);
	return res;
}
int main()
{
	freopen("talk.in","r",stdin);
	freopen("talk.out","w",stdout);
	n=read();m=read();
	for(int i=1;i<=n;i++) 
	{
		p[i]=i;
		x[i].a=read(),x[i].b=read();
		if(x[i].b==-1) x[i].b=1e9;
	}
	sort(x+1,x+n+1);
	db ans=1e9;
	if(n<=7) 
	{
		do
		{
			ans=min(ans,dp());
		}while(next_permutation(p+1,p+n+1));
	}
	else ans=dp();
	printf("%.8lf",ans);
	return 0;
}

